package com.le.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 板块和二级板块
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tbl_board")
public class Board implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer boardid;
    private String boardname;
    private Integer parentid;


    @TableField(exist = false) // 这表示实际表中不存在这个列，这样在 insert，update的时候不会生成对应的sql语句
    private Integer total;
    @TableField(exist = false)
    private Integer topicid;
    @TableField(exist = false)
    private String title;
    @TableField(exist = false)
    private String modifytime;
    @TableField(exist = false)
    private String uname;

//    @TableField(exist = false)
//    private User user; // 用来存最新贴子的作者
//    @TableField(exist = false)
//    private Topic topic; // 用来存最新的帖子
}
